/*eslint-disable*/
// 题型

const router = require("koa-router")()

const { questionTypeApi } = require("../../../controller/question/questiontype")

const { check } = require("../../../middleware/routercheck")

const { veri } = require("../../../middleware/checkData")

router.get(
    "/questiontype/byid/:id",
    veri(["pageNum", "pageSize"], "Non empty", "query"),
    check("getquestiontype"),
    questionTypeApi)
router.get(
    "/questiontype/list",
    check("getquestiontype"),
    questionTypeApi)
router.post(
    "/questiontype/add",
    veri(["title"], "Non empty", "request"),
    check("createquestiontype"),
    questionTypeApi)
router.put(
    "/questiontype/edit/:id",
    veri(["id"], "Non empty", "params"),
    veri(["title"], "Non empty", "request"),
    check("editquestiontype"),
    questionTypeApi)
router.delete(
    "/questiontype/remove/:id",
    veri(["id"], "Non empty", "params"),
    check("removequestiontype"),
    questionTypeApi)
router.get("/question", check("getquestion"), questionTypeApi)

module.exports = router